﻿using System.ComponentModel; 
using System.Runtime.CompilerServices; 

namespace WPF.Core.Dtos
{
    /// <summary>
    /// 分页基类
    /// </summary>
    public class PageingInfo : INotifyPropertyChanged
    {
        private long count;

        public long Count
        {
            get { return count; }
            set { count = value; RaisePropertyChanged(); }
        }

        private int pageNumber;

        public int PageNumber
        {
            get { return pageNumber; }
            set { pageNumber = value; RaisePropertyChanged(); }
        }

        private int pageSize;

        public int PageSize
        {
            get { return pageSize; }
            set { pageSize = value; RaisePropertyChanged(); }
        }

        public event PropertyChangedEventHandler? PropertyChanged;

        public void RaisePropertyChanged([CallerMemberName] string propertyName = "")
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
